package com.wilmar.process.entity.vo;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.wilmar.process.core.ProcessSystemDeclareKeys;
import com.wilmar.process.entity.SubProcessInstanceRelation;

/**
 * SubProcessInstanceRelation entity.
 * 
 * @author MaKuBEX
 */
public class SubProcessInstanceRelationVO extends AbstractValueObject implements
		java.io.Serializable {
	/**
	 * @serialField
	 */
	private static final long serialVersionUID = 7200567985342602796L;
	// Fields

	private Long id;
	private Long parentDbid;
	private Long subDbid;
	private Date createTime;
	private String s_createTime;
	private Integer version;
	private Integer state;
	private String parentExid;
	private String subExid;

	/**
	 * 完整构造函数，从pojo构造
	 * 
	 * @param pojo
	 *            pojo对象
	 */
	public SubProcessInstanceRelationVO(SubProcessInstanceRelation pojo) {
		this.id = pojo.getId();
		this.createTime = pojo.getCreateTime();
		if (this.createTime == null) {
			SimpleDateFormat sdf = new SimpleDateFormat(
					ProcessSystemDeclareKeys.SYSTEM_LONG_DATE_FORMAT
							+ ProcessSystemDeclareKeys.SYSTEM_DATE_SEPTATOR
							+ ProcessSystemDeclareKeys.SYSTEM_LONG_TIME_FORMAT);
			this.s_createTime = sdf.format(this.createTime);
		} else {
			this.s_createTime = "";
		}
		this.version = pojo.getVersion();
		this.state = pojo.getState();
		this.parentDbid = pojo.getParentDbid();
		this.subDbid = pojo.getSubDbid();
		this.parentExid = pojo.getParentExid();
		this.subExid = pojo.getSubExid();
	}

	/**
	 * 完整构造函数
	 * 
	 * @param id
	 * @param parentDbid
	 * @param subDbid
	 * @param createTime
	 * @param version
	 * @param state
	 * @param parentExid
	 * @param subExid
	 */
	public SubProcessInstanceRelationVO(Long id, Long parentDbid, Long subDbid,
			Date createTime, Integer version, Integer state, String parentExid,
			String subExid) {
		super();
		this.id = id;
		this.parentDbid = parentDbid;
		this.subDbid = subDbid;
		this.createTime = createTime;
		this.version = version;
		this.state = state;
		this.parentExid = parentExid;
		this.subExid = subExid;
	}

	/**
	 * 默认构造函数
	 */
	public SubProcessInstanceRelationVO() {
		super();
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the parentDbid
	 */
	public Long getParentDbid() {
		return parentDbid;
	}

	/**
	 * @param parentDbid
	 *            the parentDbid to set
	 */
	public void setParentDbid(Long parentDbid) {
		this.parentDbid = parentDbid;
	}

	/**
	 * @return the subDbid
	 */
	public Long getSubDbid() {
		return subDbid;
	}

	/**
	 * @param subDbid
	 *            the subDbid to set
	 */
	public void setSubDbid(Long subDbid) {
		this.subDbid = subDbid;
	}

	/**
	 * @return the createTime
	 */
	public Date getCreateTime() {
		return createTime;
	}

	/**
	 * @param createTime
	 *            the createTime to set
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * @return the version
	 */
	public Integer getVersion() {
		return version;
	}

	/**
	 * @param version
	 *            the version to set
	 */
	public void setVersion(Integer version) {
		this.version = version;
	}

	/**
	 * @return the state
	 */
	public Integer getState() {
		return state;
	}

	/**
	 * @param state
	 *            the state to set
	 */
	public void setState(Integer state) {
		this.state = state;
	}

	/**
	 * @return the parentExid
	 */
	public String getParentExid() {
		return parentExid;
	}

	/**
	 * @param parentExid
	 *            the parentExid to set
	 */
	public void setParentExid(String parentExid) {
		this.parentExid = parentExid;
	}

	/**
	 * @return the subExid
	 */
	public String getSubExid() {
		return subExid;
	}

	/**
	 * @param subExid
	 *            the subExid to set
	 */
	public void setSubExid(String subExid) {
		this.subExid = subExid;
	}

	/**
	 * @return the s_createTime
	 */
	public String getS_createTime() {
		return s_createTime;
	}

	/**
	 * @param sCreateTime
	 *            the s_createTime to set
	 */
	public void setS_createTime(String sCreateTime) {
		s_createTime = sCreateTime;
	}

}